/********************************************************************
 
 Copyright (C), 2012年 dhc. All rights reserved.
 
 Filename: 	    NavigationMainViewController.h 
 
 Author:        muzongcun
 
 Version:       1.0
 
 Description:   邮件功能主界面
 
 History:
 
 muzongcun    2012/3/10     1.0     Create
 
 ********************************************************************/

#import <UIKit/UIKit.h>
#import "NavigationViewController.h"
#import "MailList.h"
#import "MailStafferList.h"
#import "MailClientList.h"
/*
 定义选址箱体类型
 */
typedef enum  _BOX_TYPE
{
    RECEIVE_BOX        = 1,     //接收邮箱
    SEND_BOX           = 2,     //发送邮箱
    WAIT_SEND_BOX      = 21,    //待发箱
    WAIT_EVALUTE_BOX   = 22,    //正批箱
    WITHDRAWL_BOX      = 24,    //退回箱
    HAVE_SENDED_BOX    = 3,     //已经发送邮箱
    DRAFT_BOX          = 4,     //草稿邮箱
    TRASH_BOX          = 5,     //垃圾邮箱
    RECYCLE_BOX        = 6,     //回收箱
    DELETED_BOX        = 7,     //已删除邮箱
    BOX_MAX,
    BOX_NON
} BoxType;

@interface NavigationMainViewController : UIViewController <UITableViewDelegate,                        UITableViewDataSource,NavigationViewControllerDelegate,
    MailStafferListDelegate,MailClientListDelegate> 
{
    BOOL                        m_menuShown;
    BOOL                        m_bStretch;           //树型控件的伸展
    BOOL                        m_bStafferClient;     //业务员还是客户tab(YES业务员,NO客户)
    UITableView*                m_tableView;
    NSArray *                   m_tableTitles;
    MailList *                  m_mailList;
    CGRect                      m_contentBaseFrame;
    NavigationViewController*   m_nav;
    MailStafferList*            m_mailStafferList;    //业务员列表选择
    MailClientList*             m_mailClientList;     //客户列表选择
    UINavigationBar*            m_topnavBar;          //导航bar
    UIImage*                    m_btnImageNormal;     //button正常显示的图片
    UIImage*                    m_btnImagePress;      //button按下后显示的图片
    UIImageView*                m_ImageView;          //显示业务员，客户名称的view
    UIButton*                   m_switchBut;          //业务员，客户人员选择列表
    UIButton*                   m_stafferClientSwitchBut;
    UIButton*                   m_oneSelfBtn;         //切换自身按钮
    UIButton*                   m_stafferSwitchBut;   //业务员切换按钮
    UILabel*                    m_tabStafferTiltle;   //业务员的名字
    UIButton*                   m_clientSwitchBut;    //客户切换按钮
    UILabel*                    m_tabClientTiltle;    //客户的名字
    BoxType                     m_boxType;            //定义箱体类型
    UIButton*                   m_receiveBut;         //接收箱
    UIButton*                   m_sendBut;            //发送箱
    UIButton*                   m_clientSendBut;      //客户发送箱
    UIButton*                   m_waitSendBut;        //等待发送的邮件
    UIButton*                   m_waitEvaluteBut;     //等待批复的邮箱
    UIButton*                   m_withDrawalBut;      //退回邮箱
    UIButton*                   m_haveSendedBut;      //已经发送邮箱
    UIButton*                   m_draftBut;           //草稿箱
    UIButton*                   m_trashBut;           //垃圾箱
    UIButton*                   m_recycleBut;         //回收箱
    UIButton*                   m_deletedBut;         //已经删除邮箱
    UILabel *                   m_stafferNameTitle;   //职位名字（经理,总经理,业务员）
    UILabel *                   m_stafferName;        //经理,总经理,业务员的名字
    UILabel *                   m_LoginName;          //登陆身份：业务员或者经理以上级别
    UILabel*                    m_receiveMailNum;     //未读邮箱的数量
    UILabel*                    m_sendMailNum;        //未读发送邮箱的数量
    UILabel*                    m_haveSendedNum;      //未读已经发送邮箱的数量
    UILabel*                    m_draftMailNum;       //未读草稿邮箱的数量
    NSString*                   m_strPositonName;     //职位名字
    NSString*                   m_strEmployeeID;      //员工id
    NSString*                   m_stafferClientInfo;  //业务员客户显示信息
    
    NSString*                   m_stafferSwitchName;  //保存业务员切换人员的名字  
    NSString*                   m_ClientSwittchName;  //保存客户切换人员的名字
    NSString*                   m_stafferSwitchID;    //保存业务员切换人员id
    NSString*                   m_ClientSwittchID;    //保存客户切换人员的id
    NSString*                   m_postionName;        //显示职位的名字
    
    //发送邮箱未读邮件的view
    UIImageView*                m_sendMailNumImageView;     //发送邮件的数量
    UIImageView*                m_mailTreeImageViewNormal;  //树没有展开的图标
    UIImageView*                m_mailTreeImageViewPress;   //树展开后的图标
    UIImageView*                m_waitSendAngleArrowView;   //树型折叠线
    UIImageView*                m_waitEvaluteAngleArrowView;//树型折叠线
    UIImageView*                m_withdrawAngleArrowView;   //树型折叠线
}
/*
 属性
 */
@property (nonatomic,retain) NavigationViewController*  m_nav;
@property (nonatomic,retain) UINavigationBar*           m_navBar;
@property (nonatomic,assign) BoxType                    m_boxType;
@property (nonatomic,assign) MailList*                  m_mailList;
@property (nonatomic,retain) UITableView*               m_tableView;
@property (nonatomic,assign) BOOL                       m_bStafferClient;
@property (nonatomic,retain) NSString*                  m_strEmployeeID;
@property (nonatomic,retain) NSString*                  m_ClientSwittchName; 
@property (nonatomic,retain) UILabel*                   m_receiveMailNum;
/*
 主navigation单击事件处理button
 */

//切换业务员和客户
- (void) onStafferSwitch;
- (void) onClientSwitch;
- (void) onStafferClientSwitch;

//tab切换按钮事件
- (void) onStafferTabSwitch;
- (void) onClientTabSwitch;

- (void) onReceive;
- (void) onSend;            //发送箱
- (void) onClientSend;      //客户发送箱
- (void) onWaitSend;        //待发
- (void) onWaitEvalute;     //待批／正批箱
- (void) onWithDrawl;       //退回
- (void) onHaveSended;      //已发送箱
- (void) onDraft;
- (void) onTrash;
- (void) onRecycle; 
- (void) onDelete; 
- (void) SetAllButImage;



/*
 设置tab的图片
 */
- (void) SetTabImage:(BOOL) bIsTab;

/*
 快速切换到自身
 */
-(void) onSwitchOneSelf;

/*
 切换为半屏views
 */
- (void) chickSplitHalfView;

- (void) setVisible:(BOOL)visible;

@end
